xen/blkfront: force data bouncing when backend is untrusted
authorRoger Pau Monne <roger.pau@citrix.com>
Thu, 7 Apr 2022 11:04:24 +0000 (13:04 +0200)
committerBen Hutchings <benh@debian.org>
Sat, 23 Jul 2022 22:32:10 +0000 (23:32 +0100)
commit91c504ae8f8a6bacdf90cde792c2e9cad109b483
treeb7e22ea3e9fb34f3d300c75b4495e84b82740162
parent8e6fa24336426f7c906bb1a9dd9e7ceeceb91a83
xen/blkfront: force data bouncing when backend is untrusted

Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=cbbd2d2531539212ff090aecbea9877c996e6ce6
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2022-33742

commit 2400617da7eebf9167d71a46122828bc479d64c9 upstream.

Split the current bounce buffering logic used with persistent grants
into it's own option, and allow enabling it independently of
persistent grants.  This allows to reuse the same code paths to
perform the bounce buffering required to avoid leaking contiguous data
in shared pages not part of the request fragments.

Reporting whether the backend is to be trusted can be done using a
module parameter, or from the xenstore frontend path as set by the
toolstack when adding the device.

This is CVE-2022-33742, part of XSA-403.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name xen-blkfront-force-data-bouncing-when-backend-is-unt.patch
drivers/block/xen-blkfront.c